[%# -*- mode: html -*- %]
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Bug Tracking System.
  #
  # The Initial Developer of the Original Code is Netscape Communications
  # Corporation. Portions created by Netscape are
  # Copyright (C) 1998 Netscape Communications Corporation. All
  # Rights Reserved.
  #
  # Contributor(s): Terry Weissman <terry@mozilla.org>
  #                 Jacob Steenhagen <jake@bugzilla.org>
  #                 Vitaly Harisov  <vitaly@rathedg.com>
  #                 Guy Pyrzak <guy.pyrzak@gmail.com>
  #%]

[%# INTERFACE:
  # release: a hash containing data about new releases, if any.
  #%]

[% PROCESS global/variables.none.tmpl %]


[% PROCESS global/header.html.tmpl
   title = "$terms.Bugzilla 首頁"
   header = "首頁"
   header_addl_info = "版本 $constants.BUGZILLA_VERSION"
   style_urls = [ 'skins/standard/index.css' ]
%]


<script type="text/javascript">
<!--
function onLoadActions() {
  quicksearchHelpText('quicksearch_main', 'show');
  if( window.external.AddSearchProvider ){
    YAHOO.util.Dom.removeClass('quicksearch_plugin', 'bz_default_hidden');
  }
  document.getElementById('quicksearch_top').focus();
}
function addSidebar() {
  var sidebarname=window.location.host;
  if (!/bug/i.test(sidebarname))
    sidebarname="[% terms.Bugzilla %] "+sidebarname;
  window.sidebar.addPanel (sidebarname, "[% urlbase FILTER html %]sidebar.cgi", "");
}
var quicksearch_message = "輸入 [% terms.bug %] 的編號或字串進行搜尋";

function checkQuicksearch( form ) {
  if (form.quicksearch.value == '' || form.quicksearch.value == quicksearch_message ) {
    alert('請至少先輸入一個以上的字串進行搜尋。');
    return false;
  }
  return true;
}

function quicksearchHelpText(el_id, action){
  var el = document.getElementById(el_id);
  if ( action == "show") {
    if( el.value == "" ) {
      el.value = quicksearch_message
      YAHOO.util.Dom.addClass(el, "quicksearch_help_text");
    }
  } else {
    if( el.value == quicksearch_message ) {
      el.value = "";
      YAHOO.util.Dom.removeClass(el, "quicksearch_help_text");
    }
  }
}
    YAHOO.util.Event.onDOMReady(onLoadActions);
//-->
</script>

[% IF release %]
  <div id="new_release">
    [% IF release.data %]
      [% IF release.deprecated %]
        <p>已不再支援 [% terms.Bugzilla %] [%+ release.deprecated FILTER html %] 。
        建議你升級，以確保系統安全。</p>
      [% END %]

      <p>新的 [% terms.Bugzilla %] (版本 [% release.data.latest_ver FILTER html %]) 可在
      <a href="[% release.data.url FILTER html %]">[% release.data.url FILTER html %]</a> 下載。<br>
      新版本釋出日期： [% release.data.date FILTER html %] 。</p>

      <p class="notice">此一訊息僅對有管理權限的使用者顯示。
      你可以在<a href="editparams.cgi?section=general#upgrade_notification">參數設定</a>頁設定此通知。</p>
    [% ELSIF release.error == "cannot_download" %]
      <p>無法建立本地 XML 檔案 '[% release.xml_file FILTER html %]' 。請確認網站伺服器可在此目錄下寫入此檔案，以及你可以瀏覽網際網路。如果你在使用代理伺服器，請正確設定
      <a href="editparams.cgi?section=advanced#proxy_url">proxy_url</a> 參數。</p>
    [% ELSIF release.error == "no_update" %]
      <p>無法更新本地 XML 檔案 '[% release.xml_file FILTER html %]' 。請確認網站伺服器可以編輯此檔案。</p>
    [% ELSIF release.error == "no_access" %]
      <p>無法讀取本地 XML 檔案 '[% release.xml_file FILTER html %]' 。請確認此檔案已設定正確的讀寫權限。</p>
    [% ELSIF release.error == "corrupted" %]
      <p>本地 XML 檔案 '[% release.xml_file FILTER html %]' 並非有效的 XML 格式。請將它刪除，並嘗試重新瀏覽此頁面。</p>
    [% ELSIF release.error == "unknown_parameter" %]
      <p>'[% Param("upgrade_notification") FILTER html %]' 並非有效的通知參數。請點選<a
      href="editparams.cgi?section=advanced#upgrade_notification">參數設定</a>頁面，檢查此參數的設定。</p>
    [% END %]
  </div>
[% END %]

<div id="page-index">
  <table>
    <tr>
      <td>
        <h1 id="welcome">歡迎來到 [% terms.Bugzilla %]</h1>
        <div class="intro">[% Hook.process('intro') %]</div>
        <a id="enter_bug" class="bz_common_actions"
           href="enter_bug.cgi"><span>回報 [% terms.Bug %]</span></a>

        <a id="query" class="bz_common_actions"
           href="query.cgi"><span>搜尋</span></a>

        <a id="account" class="bz_common_actions"
          [% IF user.id %]
            href="userprefs.cgi"><span>使用者偏好設定</span></a>
          [% ELSIF Param('createemailregexp')
                   && user.authorizer.user_can_create_account
          %]
            href="createaccount.cgi"><span>建立新帳號</span></a>
          [% ELSE %]
            href="?GoAheadAndLogIn=1"><span>登入</span></a>
          [% END %]

        <form id="quicksearchForm" name="quicksearchForm" action="buglist.cgi"
              onsubmit="return checkQuicksearch(this);">
          <div>
            <input id="quicksearch_main" type="text" name="quicksearch"
              onfocus="quicksearchHelpText(this.id, 'hide');"
              onblur="quicksearchHelpText(this.id, 'show');"
            >
            <input id="find" type="submit" value="快速搜尋">
            <ul class="additional_links" id="quicksearch_links">
              <li>
                <a href="page.cgi?id=quicksearch.html">快速搜尋說明</a>
              </li>
              <li class="bz_default_hidden" id="quicksearch_plugin">
                |
                <a href="javascript:window.external.AddSearchProvider('[% urlbase FILTER html %]search_plugin.cgi')">
                 安裝快速搜尋插件
                </a>
              </li>
            </ul>
            <ul class="additional_links">
              <li>
                <a href="[% docs_urlbase FILTER html %]using.html">
                  [%- terms.Bugzilla %] 使用者說明</a>
              </li>
              <li>
	        |
                <a href="page.cgi?id=release-notes.html">版本資訊</a>
              </li>
            </ul>
          </div>
        </form>
	<div class="outro">[% Hook.process('outro') %]</div>
      </td>
    </tr>
  </table>
</div>

[% PROCESS global/footer.html.tmpl %]
